home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u1.d64
/
disk log.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
74 lines
100 DIMT$(4)
110 PRINT"DISK FILE LOG - JIM BUTTERFIELD"
130 C$=CHR$(0)
140 DATA 169,0, 162,4, 149,98, 202, 16,251
145 DATA 169,160, 133,97, 162,2, 32,198,255
150 DATA 230,101, 208,10, 230,100, 208,6, 230,99
155 DATA 208,2, 230,98, 32,228,255, 165,144
160 DATA 240,235, 32,204,255, 198,97
165 DATA 6,101, 38,100, 38,99, 38,98, 16,244, 96
170 DATA 169,0, 133,139, 133,140
180 DATA 230,139, 208,2, 230,140
190 DATA 162,15, 32,201,255, 169,80, 32,210,255
200 DATA 169,4, 32,210,255, 165,139, 32,210,255
205 DATA 165,140, 32,210,255
210 DATA 169,1, 32,210,255, 32,204,255
215 DATA 162,15, 32,198,255, 32,228,255
220 DATA 72, 32,204,255, 104, 201,48, 240,200, 96
230 FORJ=860TO977:READX:T=T+X:POKEJ,X:NEXTJ
240 IF T<>16312 THEN STOP
250 DATA "XXX","SEQ","PRG","USR","REL"
260 FORJ=0TO4:READT$(J):NEXT
270 INPUT"PRINTER";Z$
280 Z=3:IFASC(Z$)=89THENZ=4:INPUT"DATE";D$
290 U=8:REM UNIT 8
300 D=0:REM DRIVE 0
330 OPEN4,Z:OPEN1,U,15,"I"+CHR$(D+48):CLOSE1
340 G$=" "
350 OPEN15,U,15
360 OPEN1,U,3,"$"+CHR$(D+48)
370 GET#1,A$:A=ASC(A$+" ")
380 IFA=1ORA=65THENL1=141:L2=89:GOTO410
390 IFA=67THENL1=3:L2=735:GOTO410
400 CLOSE1:PRINT"???":STOP
410 PRINT#4,"*** DISK LOG *** ";D$
420 FORJ=1TOL1:GET#1,A$:NEXTJ
430 PRINT#4," ";:FORJ=1TO23:GET#1,A$:PRINT#4,A$;:NEXTJ
440 PRINT#4:FORJ=1TOL2:GET#1,A$:NEXTJ
450 M=M+1:GET#1,K$,T$,S$
460 L7=-1:Z$=CHR$(160):F$="":FORJ=1TO16:GET#1,A$
470 IFA$=Z$THENL7=0
480 IFL7THENF$=F$+A$
490 NEXTJ
500 GET#1,A$,A$,A$:L%=ASC(A$+C$)
510 FORJ=1TO6:GET#1,A$:NEXTJ
530 GET#1,A$:L=ASC(A$+C$)
550 GET#1,A$:L=L+256*ASC(A$+C$):IFM<8THENGET#1,A$,A$:GOTO570
560 M=0
570 SW=ST:IFK$=""GOTO820
580 K=ASC(K$)-128:IFK<1ORK>4THENK=0
620 PRINT#4,T$(K);
630 PRINT#4,RIGHT$(" "+STR$(L),3);" ";
640 PRINT#4,LEFT$(F$+G$,17);
650 IFK=0GOTO810
660 IFK=4THENPRINT#4,"L=";MID$(STR$(L%),2);
670 OPEN2,U,4,CHR$(D+48)+":"+F$+","+T$(K)
680 A=0:IFK<>2GOTO730
690 GET#2,A$,B$:A=ASC(A$+C$)
700 B=ASC(B$+C$)
710 GOSUB840
730 IFK<>4GOTO760
740 SYS915:A=PEEK(139)+PEEK(140)*256-1
750 PRINT#4,",";MID$(STR$(A),2);"R";:GOTO800
760 POKE785,92:POKE786,3:A=A+USR(0)
770 IFK<>2THENPRINT#4,A;"BYTES";:GOTO800
780 PRINT#4," ";:A%=A/256:A=A-A%*256:B=B+A%
790 GOSUB840
800 CLOSE2
810 PRINT#4
820 IFSW=0GOTO450
830 CLOSE1:CLOSE4:CLOSE15:END
840 X=B/16:GOSUB850:X=A/16
850 FORJ=1TO2:X%=X:X=(X-X%)*16:IFX%>9THENX%=X%+7
860 PRINT#4,CHR$(X%+48);:NEXTJ:RETURN